package com.example.fanday.play.di.module;

import android.content.Context;

import com.example.fanday.play.base.BaseApplication;
import com.example.fanday.play.cons.Dagger2Cons;
import com.example.fanday.play.di.scope.ContextLife;
import com.example.fanday.play.di.scope.PerApp;

import dagger.Module;
import dagger.Provides;

/**
 * Created by fanday on 2017/8/12.
 */
@Module
public class ApplicationMudule {
    private BaseApplication application;

    public ApplicationMudule(BaseApplication application) {
        this.application = application;
    }

    @Provides
    @PerApp
    @ContextLife(Dagger2Cons.APPLICATION)
    public Context providerApplicationContext(){
        return application.getApplicationContext();
    }
}
